package com.example.wemedia.controller;
import com.example.model.wemedia.pojo.User;
import com.example.wemedia.service.UserService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@Tag(name = "User")
@RestController
@RequestMapping("user")
public class UserController  {
    @Autowired
    private UserService userService;

    /*@GetMapping("/getInfo/{id}")
    @Operation(summary = "按照ID编号查看")
    public ResultBean<User> selectOne(@PathVariable Serializable id) {
        return ResultBean.success(this.userService.getById(id));
    }

    @PostMapping("/save")
    @Operation(summary = "增加User")
    public ResultBean insert(@RequestBody User user) {
        this.userService.save(user);
        return ResultBean.success();
    }

    @PutMapping("/update")
    @Operation(summary = "修改User")
    public ResultBean update(@RequestBody User user) {
        this.userService.updateById(user);
        return ResultBean.success();
    }

    @DeleteMapping("/remove")
    @Operation(summary = "删除User")
    public ResultBean delete(@RequestParam("idList") List<Long> idList) {
        this.userService.removeByIds(idList);
        return ResultBean.success();
    }*/
}

